<div class="eventsSidebar <?php echo $sideCallerName?>">
<?php
uses("sanitize","Flay");
foreach($sideBarEvents as $sideBarEvent)
{
	$img = $html->image($sideBarEvent['Event']['image'], array('alt'=>'No Image','height'=>'75','width'=>'75'));
	$totalInterested = $sideBarEvent['Event']['whosin_count'] + $sideBarEvent['Event']['soundscool_count'];
	$sideBarEventWhen = date("F, d",strtotime($sideBarEvent['Event']['event_from']));
	if(isset($sideBarEvent['Event']['event_to']) && $sideBarEvent['Event']['event_to']!=null)
	{
		$sideBarEventWhen = $sideBarEventWhen . ' - ' . date("F, d",strtotime($sideBarEvent['Event']['event_to']));
	}
	$url = $html->url($sideBarEvent['Event']['viewUrl'], true);
	$title = $sideBarEvent['Event']['title'];
	
	$partialDescription = strip_tags($sideBarEvent['Event']['description']);
	$partialDescription = str_replace(array("\n"), "", $partialDescription);
	$partialDescription = Flay::fragment($partialDescription,50);
	?>
	<div class="event box_in">
		
			<div class="line">
				<div class="unit size1of3">
					<a href="<?php echo $url;?>" title="<?php echo h($title)?>"><?php echo $img;?></a>
				</div>
				<div class="unit size2of3">
					<a title="<?php echo h($title)?>" href="<?php echo $url;?>"  class=""><?php echo $title;?></a>
					<div class="clear"></div>
					<strong><?php echo $sideBarEventWhen;?></strong>
					<div class="clear"></div>
					<strong>
					<?php 
					echo sprintf(__n("%s is interested","%s are interested",$totalInterested, true),$totalInterested);
					?>
					</strong>
				</div>
			</div> 
			<div class="clear"></div>
			<div class="event_description">
				<?php echo $partialDescription;?>
			</div>
		
		<div class="clear"></div>
	</div>
	<div class="clear"></div>
	<?php 
}
?>
</div>
<div class="clear"></div>